export default function SearchByRole(roleKey: any) {
  let personInfo: any = JSON.parse(
    localStorage.getItem('personInfo') as string,
  );

  switch (roleKey) {
    case '个人视角':
      break;
    case '子方向视角':
      return {
        people: personInfo.ROLE_子方向负责人.data,
      };

    case '方向视角':
      return {
        people: personInfo.ROLE_方向负责人.data,
        team: personInfo.ROLE_方向负责人.group,
      };
    case '管理员视角':
      return {
        people: personInfo.ROLE_管理员.data,
        team: personInfo.ROLE_管理员.group,
        direction: personInfo.ROLE_管理员.direction,
      };

    default:
      break;
  }
}
